<?
//引入所有子系统信息
include_once("../../../common/model/extender_import.php");

//获取板块的设置
include_once("model/setting.php");


//根据筛选框传递过来的内容，组装查找语句
include_once("model/set_condition.php");


//根据页面信息，组装查找语句
include_once("model/set_page.php");


//根据页面数量信息，筛选信息，创造url，供页码使用
include_once("model/set_url.php");


//echo $_data_start;
//echo "<br/>";
//echo $_quantity_per_page;
//echo "<br/>";
//exit;

//获取数据。注意带上翻页，搜索，排序等数据


$data_list=select_lines_all_items($table_prefix."opportunity","FIELD(status, '未开始', '进行中', '失败','终止',  '成功'),nid desc",$_condition,"$_data_start,$_quantity_per_page");
$data['data_list']=$data_list;

$unit_nid_list     = transform_2darray_in_1darray_with_new_key($data_list, "nid", "unit_nid");
$unit_nid_list_str = implode("','", $unit_nid_list);
$unit_list         = select_lines_all_items($table_Prefix . "unit", "", "nid in ('" . $unit_nid_list_str . "')", "");
$unit_name_list    = transform_2darray_in_1darray_with_new_key($unit_list, "nid", "name");



$employee_list=select_lines_all_items($table_Prefix."employee","status asc,leavedate desc,nid","","0");
$employee_name_array     = transform_2darray_in_1darray_with_new_key($employee_list, "nid", "name");

//todo 这部分有函数可以实现到。
//获取本页用到的单位的名字
//$unit_nid_list     = transform_2darray_in_1darray_with_new_key($data['data_list'], "nid", "unitnid");
//$unit_nid_list_str = implode("','", $unit_nid_list);
//$unit_list         = select_lines_all_items($table_Prefix . "unit", "", "nid in ('" . $unit_nid_list_str . "')", "");
//$unit_name_list    = transform_2darray_in_1darray_with_new_key($unit_list, "nid", "name");

?>

